Halo CE BSP Tag Converter V2.5

Made by: FireScythe
Based Upon: BSP Tag Converter V2 Source by Jahrain

E-Mail: FireScythe813@hotmail.co.uk

Summary:
This BSP converter takes a Halo CE BSP in tag format, collects raw data from it and outputs an obj file usable in any compatable modelling program.

Because of small problems with V2, (bitmap extraction, errors when opening certain BSP's) I decided as a little project to re-make the converter from scratch in C# to make a more robust version. 

I did use Jahrains source code (given to me when adding bitmap extraction for V2) as a reference so I hope he doesnt mind too much. 

I ended up added other features to this one such as portal conversion, marker extraction, etc. so have fun with those.

Features:
- Perfect mesh conversion from tag to obj
- Full extraction of bitmaps used by the bsp
- Fully applied materials through the use of a .mtl file
- Optional seperate mesh by material
- Lens Flare Marker extraction
- BSP Marker extraction
- Portal Faces conversion
- Fog Plane conversion

BSP Conversion:
To convert a BSP - 
1. Goto File-Open BSP
2. Select and open the BSP to convert
3. Select the options you want enabled
4. Click "Convert Model"

The resulting files will be located in the relative folder the BSP tag is found in. For example:
A BSP tag in:

C:\Pro........tom Edition\tags\levels\test\bloodgulch

will have its resulting files in:

C:\Pro........tom Edition\data\levels\test\bloodgulch

To import the BSP into 3ds Max - 
1. Open 3ds Max
2. Goto File-Import
3. Change the file type to ".obj"
4. Select the newly created BSP mesh
5. When the import dialog box appears use the options as follows

	Rotate Model - 		Unchecked
	Texture Coordinates - 	Checked
	Normals - 		Checked
	Unify - 		Unchecked
	Obj Smooth Groups - 	Unchecked
	Smooth Group - 		1
	Vertex Scale - 		1.0
	Use Materials - 	Checked
	Material Library - 	Use the filename under "Material Library"
				on the BSP Converter
6. Click "OK"


Post BSP Conversion Script:
Included in the program is a max script utility that is used to import the lens flare and BSP markers. It is accessed by pressing the "Get Script" button in the menu bar.

The script also fixes texture viewing problems in 3ds Max by setting all materials to show in viewport and also sets all bitmaps to ignore the alpha channel.

To use the script - 
1. Click the hammer tab on the far right of the screen.
2. Click the "MAXScript" button.
3. Click the "Run Script" button.
4. Select and open the script.
5. Re-select "BSP Post Script" from the utilities drop down list.

To fix the textures - 
1. Select all of the objects
2. Click "Fix Materials

To import markers - 
1. Set the desired marker radius
2. Click "Import"
3. Select and open the txt file made by the BSP converter


Special Thanks:

Jahrain for the original BSP Converter and the source code, without which I probably wouldnt have had a clue how to do this.

Kornman for his TagInterfaceV2.dll that made reading tags alot easier.